package HomeworkZoo;


public class Feeder {
    private String name;

    public Feeder(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    //多态
    public void feed(Animal ani, Food food){
        ani.eat(food);
        ani.shout();
    }

   /* public void feed(Cat cat,Food food){
        cat.eat(food);
        cat.shout();
    }
    public void feed(Dog dog,Food food){
        dog.eat(food);
        dog.shout();
    }*/
    public void say(){
        System.out.println("大家好，我是饲养员"+this.name);
    }

}



